﻿<!DOCTYPE html>
<html>
<head>
    <title>CGI</title>
</head>
<body>
    <h1>Our Page</h1>
    <script>
        //01

        var level = 5;

        ++level;
        console.log(level);

        level++;
        console.log(level);

        //02
        /*
        var level = 5;

        //var nextLevel = ++level;
        //console.log(nextLevel);

        //post increment
        var nextLevel = level++;
        console.log(nextLevel);
        */

        //03
        /*
        var level = 5;
        var nextLevel = --level;
        console.log(nextLevel);
        */

        //04
        /*
        var level = 5;
        var base = 10;
        var nextLevel = level-- * base;
        console.log(nextLevel);
        */

        //05
        /*
        var level;
        console.log(++level);

        var level = null;
        console.log(++level);
        */

        //06
        /*
        var value = 9;
        value = +value;
        console.log(value);

        var value = -9;
        value = +value;
        console.log(value);

        var value = 'calc';
        value = +value;
        console.log(value);
        */

        //07
        /*
        var value = 42;
        value = -value;
        console.log(value);

        var value = -42;
        value = -value;
        console.log(value);

        var value = 'calc';
        value = -value;
        console.log(value);
        */
    </script>
</body>
</html>